package com.qianfeng.wuyang.himalaya.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.qianfeng.wuyang.himalaya.fragment.RbDownLoadBaseFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/12/7.
 */

public class FragmentRbDownLoadAdapter extends FragmentPagerAdapter {
    private List<String> list;
    private List<String> lists;

    public FragmentRbDownLoadAdapter(FragmentManager fm, List<String> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return RbDownLoadBaseFragment.newInstance(list.get(position));
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        lists=new ArrayList<>();
        lists.add("专辑");
        lists.add("声音");
        lists.add("下载中");
        return lists.get(position);
    }
}
